import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [vue()],
  base: '/stockui/',
  server: {
    proxy: {
      '/stock/api': {
        target: 'http://localhost:3800',
        changeOrigin: true,
        secure: false,
        rewrite: (path) => path.replace(/^\/stock\/api/, '/stock/api')
      }
    }
  },
  resolve: {
    alias: {
      '@': '/src'
    }
  }
})